Skip to main content

Account Access

Introduction

Inside yeet and the apps you build with it, the registration system is intentionally kept simple.
The process is based on email registration to ensure valid user identities.

It consists of the following steps:

  1. Enter a valid email address that is not yet used by any other user in this database.
  2. You will receive an email containing a confirmation code. Enter this code on the page you are redirected to.
  3. Finally, choose a valid password and confirm it.

Password reset uses the same flow and is based on the same underlying system.

Configuring your appsettings

On the server side you need to make some adjustments for the registration pipeline to work correctly and to customize the process.

For each database, you must configure mail settings. For example:

appsettings.json
"DatabaseSettings": {
"standalone": {
...
"RegistrationExpiryMinutes": 15,
...
"MailSettings": {
...
"User": {
"registerUser": {
"From": "yeet Registration",
"Password": "testuser@1234",
"SystemUser": true,
"TemplateFileName": "registerUser.html",
"User": "testuser@vectorsoft.de"
},
"resetPassword": {
"From": "yeet password reset",
"Password": "testuser@1234",
"SystemUser": true,
"TemplateFileName": "resetPassword.html",
"User": "testuser@vectorsoft.de"
}
}
}
},
...

In this configuration, you can adjust several properties that are specific to the registration and password reset process. As a prerequisite, you need to define an SMTP mail server under Smtp.

RegistrationExpiryMinutes
Defines how long the registration process may take before the confirmation code expires. After this time, the user must restart the registration flow and request a new code.

registerUser
Inside this object, you configure all required properties for the registration pipeline:

  • From: Display name of the sender, shown in the email header.
  • Password: Password of the mail server user that sends the emails.
  • SystemUser: Should be set to true, because this user sends emails from your server and is not a physical person.
  • TemplateFileName: File name of the customizable email template on your server.
  • User: Email address of the system user that sends the email.

resetPassword
The password reset flow uses the same mechanism as the registration flow. It requires the same configuration fields as registerUser, so they are not explained again here. You can reuse the same structure and adjust the template and sender name as needed.